class AccountDashboardController{
    constructor($state,$scope,$rootScope){
        Object.assign(this,{$state,$scope,$rootScope});
        let currentState = $state.$current.name;
        let group1 =["orderlistmain","orderlist","awardlist","profitreport"];
        let group2 =["fundlist","chargeapply","chargeorderlist","cashapply","cashlist"];
        let group3 =["accountinfo","bindaccountcash","pwd"];
        this.$rootScope.currentGroup=0;
        let self = this;
        group1.forEach(function (item,index,currArray) {
            if(currentState.indexOf(item)!=-1){
                self.$rootScope.currentGroup=0;
                return;
            }
        })
        group2.forEach(function (item,index,currArray) {
            if(currentState.indexOf(item)!=-1){
                self.$rootScope.currentGroup=1;
                return;
            }
        })
        group3.forEach(function (item,index,currArray) {
            if(currentState.indexOf(item)!=-1){
                self.$rootScope.currentGroup=2;
                return;
            }
        })
        //$("#menu").metisMenu();
    }
}
AccountDashboardController.$inject = ["$state","$scope","$rootScope"];

export default AccountDashboardController;